<form class="layui-form" action="" lay-filter="component-form-group">
  <script type="text/html" template lay-url="{{ layui.setter.baseUrl }}cash/add&type={{ layui.cashtype }}" 
  lay-done="layui.form.render(null, 'component-form-group');">
      <div class="layui-form-item tpl-district-container">
          <label class="layui-form-label">提现金额</label>
          <div class="layui-input-block">
            <input type="text" name="data[price]" value="￥{{ d.data.price }}" class="layui-input" disabled>
          </div>
      </div>
      <div class="layui-form-item tpl-district-container">
          <label class="layui-form-label">提现方式</label>
          <div class="layui-input-block">
              <select name="data[type]" class="form-control">
                <option value="alipay">支付宝</option>
                <option value="wechat">微信</option>
              </select>
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">账号</label>
          <div class="layui-input-block">
              <input type="text" name="data[cardnum]" value="" lay-verify="required" autocomplete="on" placeholder="请输入账号" class="layui-input">
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">姓名</label>
          <div class="layui-input-block">
              <input type="text" name="data[name]" value="" lay-verify="required" autocomplete="on" placeholder="请输入姓名" class="layui-input">
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">手机号</label>
          <div class="layui-input-block">
              <input type="text" name="data[mobile]" value="" lay-verify="required" autocomplete="on" placeholder="请输入手机号" class="layui-input">
          </div>
      </div>
      
      <div class="layui-form-item">
          <div class="layui-input-block">
              <div class="layui-footer">
                  <input type="hidden" id="token" name="data[token]" value="{{ d.data.token }}">
                  <button class="layui-btn" lay-submit="" lay-filter="component-form-demo1" name="submit">立即提交</button>
                  <button type="reset" class="layui-btn layui-btn-primary">重置</button>
              </div>
          </div>
      </div>
  </script>
  </form>
  
  <script>
  layui.use(['admin', 'form', 'upload', 'laydate'], function(data){
      var $ = layui.$
      ,admin = layui.admin
      ,element = layui.element
      ,layer = layui.layer
      ,laydate = layui.laydate
      ,form = layui.form
      ,upload = layui.upload;
      
      /* 监听提交 */
      form.on('submit(component-form-demo1)', function(data){
          $.post(
              layui.setter.baseUrl+'cash/add&type='+layui.cashtype,
              data.field,
              function(ret){
                  var {code,msg,data} = ret;
                  layer.msg(msg);
                  $('#token').val(data.token);
                  if(code == 0){
                      layer.closeAll('page');
                      layui.table.reload('LAY-cashtj-manage');
                      layui.table.reload('LAY-cash-manage');
                  }
              }
          );
          return false;
      });
  });
  </script>